From: jchesterfield@wicket.uk.xensource.com Date: Thu, 13 Jul 2006 14:33:08 +0000 (+0100) Subject: xend save/restore fix, only matches one device type (vbd or tap) on creation of vm. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~15855 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success//%22http:/www.example.com/cgi/success/?a=commitdiff_plain;h=093efe78389af46d81dffb00b579f16aa70fcc51;p=xen.git xend save/restore fix, only matches one device type (vbd or tap) on creation of vm. --- diff --git a/tools/python/xen/xend/server/DevController.py b/tools/python/xen/xend/server/DevController.py index 61c11ce93f..42adfd987a 100644 --- a/tools/python/xen/xend/server/DevController.py +++ b/tools/python/xen/xend/server/DevController.py @@ -346,7 +346,7 @@ class DevController: """@return The IDs of each of the devices currently configured for this instance's deviceClass. """ - fe = self.frontendRoot() + fe = self.backendRoot() if transaction: return map(lambda x: int(x.split('/')[-1]), transaction.list(fe)) else: @@ -439,6 +439,11 @@ class DevController: def frontendRoot(self): return "%s/device/%s" % (self.vm.getDomainPath(), self.deviceClass) + def backendRoot(self): + import xen.xend.XendDomain + from xen.xend.xenstore.xsutil import GetDomainPath + backdom = xen.xend.XendDomain.PRIV_DOMAIN + return "%s/backend/%s/%s" % (GetDomainPath(backdom), self.deviceClass, self.vm.getDomid()) def frontendMiscPath(self): return "%s/device-misc/%s" % (self.vm.getDomainPath(),